Computer systems represent data in a variety of formats. One commonly use format is a table format. With a table format, data is organized into rows and columns, and data is stored in the cells of the table. The cells of a table are formed by each intersection of a row and a column. The table format is used to represent data in many computer application programs including spreadsheet, database, and word processing programs.
FIG. 1 illustrates data that is shown in a table format. Table 110 has two columns 111 and 112 and four rows 113-116. Table 110 has eight cells that are at the intersections of the columns and rows. Each cell is identified by its corresponding row and column number. For example, cell 113:111 is the cell at the intersection of row 113 and column 111. In this example, the cells in column 111 contain words or phrases, and the cells in column 112 contain the definitions for the words or phrases. Each column in a table has a column width that may be specified in inches or in number of characters (of a fixed-width font). For example, column 111 is 9 characters in width and column 112 is 23 characters in width. Each row has a row height that may contain several lines of data. For example, row 113 has a row height of 4 lines. Since the phrase "formal language" at cell 113:111 is 15 characters wide (including the space between the words), the phrase cannot fit within one line of the cell. Therefore, the phrase is wrapped to the second line of the cell. On the other hand, since the phrase "form feed" at cell 115:111 is 9 characters wide, the phrase fits within one line of the cell. When the data (typically text) within a cell is wider than the column, the column is referred to as wrapped.
Typical application programs that support the table format allow a user to manipulate the format of the table. For example, a user may add or delete rows and columns to and from the table. A user may also change the width of (resize) the columns of the table. A user can resize column 111, for example, by selecting the border between column 111 and column 112 and moving the border to the right. This movement increases the width of column 111 and decreases the width of column 112 as shown in table 120, but the overall table width remains the same. Although the column 121 is not wrapped (is unwrapped), each row in the table has increased to contain more lines to accommodate the wrapped text in column 122, which is now narrower.
A user may then want to increase width of table 120 so that column 122 is wider. A user may increase the width of column 122 by selecting the right border of column 122 and moving the border to the edge of the display or page. For example, line 140 shows the margin widths for the page. Table 130 shows table 120 after column 122 has been increased in width to be equal to the margin width.
If the user then decides to remove row 133 from table 130, column 131 will be wider than necessary to accommodate the longest text in the column. That is, since the longest text would then be the phrase "formal logic," the user would then select the border between column 131 and column 132 and move the border to the left. This would decrease the width of column 131 and increase the width of column 132.
A user typically needs to manually change the width of the table and each column within the table as text is added to and deleted from the table or columns and rows are added to and deleted from the table. Moreover, if the margin width is changed, the various column widths would need to be manually resized to fit within the new margin width. One prior system for automatically resizing the column widths of a table simply unwraps each column. That is, the prior system determines the width of the longest text in each column and sets the width of that column to the width of the longest text. For example, such a prior system would automatically resize table 110 by setting the width of column 111 to 15 characters, which is the length of the text "formal language" in cell 113:111, and by setting the width of column 112 to 133 characters, which is the length of the descriptive text in cell 114:112. Such automatic resizing of the table is undesirable because the resized table width extends well beyond the margin width.